package model.core;

import model.effects.Effect;
import model.item.MapGold;
import utility.BidirectionalMap;

public class MapGoldLibrary {
	private BidirectionalMap<String, MapGold> library = new BidirectionalMap<String, MapGold>();
	
	private static MapGoldLibrary mapGoldLibrary = null;
	
	private MapGoldLibrary(){
		
	}
	
	public static MapGoldLibrary getInstance(){
		if (mapGoldLibrary == null){
			mapGoldLibrary = new MapGoldLibrary();
		}
		return mapGoldLibrary;
	}
	
	public MapGold getMapGold(String name){
		return library.getFromSecondSet(name).clone();
	}
	
	public String getName(MapGold eff){
		return library.getFromFirstSet(eff);
	}
	
	public void put(String name, MapGold eff){
		library.put(name, eff);
	}
}
